import 'package:base_flutter/base_flutter.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:ls_work/model/employee_model.dart';
import 'package:ls_work/net/response/employee_data_list.dart';

class SelectEmployeeViewModel extends BaseListViewModel<EmployeeDataList>{
  SelectEmployeeViewModel(BuildContext context,{this.officeId}) : super(context);
  var model = EmployeeModel();
  var nameLike = "";
  final dynamic officeId;
  @override
  Future<List<EmployeeDataList>> requestListData() async {
    return await model.employeeList(nameLike,page: page,rows: pageLength,officeId: officeId);
  }

  @override
  void onCreated() {
    super.onCreated();
    requestRefresh(showAni: false);
  }

}